﻿<UserControl x:Class="Lottery.Client.SL.Controls.BuyLottery"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    xmlns:System="clr-namespace:System;assembly=mscorlib" 
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="712">

    <UserControl.Resources>
        <Style x:Key="SelectRadioButtonStyle1" TargetType="RadioButton">
            <Setter Property="Background" Value="#FFE2FB00"/>
            <Setter Property="Foreground" Value="#FFFF1010"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush" Value="#FFF92D2D"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontFamily" Value="Arial"/>
            <Setter Property="Margin" Value="0"/>
        </Style>
        <Style x:Key="RadBtnStyle" TargetType="RadioButton">
            <Setter Property="Background" Value="#FF448DCA"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Padding" Value="4,1,0,0"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontFamily" Value="Arial"/>
        </Style>
        <Style x:Key="NumberStyle" TargetType="Rectangle">
            <Setter Property="Fill" Value="#FFEF8F02"/>
            <Setter Property="Width" Value="388"/>
            <Setter Property="Height" Value="20"/>
        </Style>
        <Style x:Key="SingelNumberStyle" TargetType="Rectangle">
            <Setter Property="Fill" Value="#FFEF8F02"/>
            <Setter Property="Width" Value="32"/>
            <Setter Property="Height" Value="20"/>
        </Style>
        <Style x:Key="DataGridFrozenGridStyle1" TargetType="sdk:DataGridFrozenGrid">
            <Setter Property="Background" Value="#AA0A0A0A"/>
        </Style>
        <Style x:Key="DataGridRowStyle1" TargetType="sdk:DataGridRow">
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="sdk:DataGridRow">
                        <sdk:DataGridFrozenGrid x:Name="Root" Height="21">
                            <sdk:DataGridFrozenGrid.Resources>
                                <Storyboard x:Key="DetailsVisibleTransition">
                                    <DoubleAnimation Duration="00:00:0.1" Storyboard.TargetProperty="ContentHeight" Storyboard.TargetName="DetailsPresenter"/>
                                </Storyboard>
                            </sdk:DataGridFrozenGrid.Resources>
                            <sdk:DataGridFrozenGrid.Style>
                                <StaticResource ResourceKey="DataGridFrozenGridStyle1"/>
                            </sdk:DataGridFrozenGrid.Style>
                            <sdk:DataGridFrozenGrid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition/>
                            </sdk:DataGridFrozenGrid.ColumnDefinitions>
                            <sdk:DataGridFrozenGrid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </sdk:DataGridFrozenGrid.RowDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="NormalAlternatingRow">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="NormalSelected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOverSelected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="UnfocusedSelected">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundRectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualState x:Name="Valid"/>
                                    <VisualState x:Name="Invalid">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BackgroundRectangle">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Opacity="0" Grid.RowSpan="2" Fill="#FF545454" d:IsHidden="True"/>
                            <Rectangle x:Name="InvalidVisualElement" Grid.ColumnSpan="2" Opacity="0" Grid.RowSpan="2"/>
                            <sdk:DataGridCellsPresenter x:Name="CellsPresenter" Grid.Column="1" sdk:DataGridFrozenGrid.IsFrozen="True"/>
                            <sdk:DataGridDetailsPresenter x:Name="DetailsPresenter" Grid.Column="1" Grid.Row="1"/>
                            <Rectangle x:Name="BottomGridLine" Grid.Column="1" HorizontalAlignment="Stretch" Height="1" Grid.Row="2"/>
                        </sdk:DataGridFrozenGrid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="DataGridRowsPresenterStyle1" TargetType="sdk:DataGridRowsPresenter"/>
        <Style x:Key="RectangleStyle1" TargetType="Rectangle">
            <Setter Property="StrokeThickness" Value="0"/>
        </Style>
        <Style x:Key="DataGridStyle1" TargetType="sdk:DataGrid">
            <Setter Property="RowBackground" Value="#AAEAEFF4"/>
            <Setter Property="AlternatingRowBackground" Value="#00FFFFFF"/>
            <Setter Property="Background" Value="#FFFFFFFF"/>
            <Setter Property="HeadersVisibility" Value="Column"/>
            <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="SelectionMode" Value="Extended"/>
            <Setter Property="CanUserReorderColumns" Value="True"/>
            <Setter Property="CanUserResizeColumns" Value="True"/>
            <Setter Property="CanUserSortColumns" Value="True"/>
            <Setter Property="AutoGenerateColumns" Value="True"/>
            <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="GridLinesVisibility" Value="Vertical"/>
            <Setter Property="HorizontalGridLinesBrush" Value="#FFC9CACA"/>
            <Setter Property="IsTabStop" Value="True"/>
            <Setter Property="VerticalGridLinesBrush" Value="#FFC9CACA"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="sdk:DataGrid">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                <Grid x:Name="Root" Background="#FF100F0F">
                                    <Grid.Resources>
                                        <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
                                            <Grid x:Name="Root">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition/>
                                                    <RowDefinition/>
                                                    <RowDefinition Height="Auto"/>
                                                </Grid.RowDefinitions>
                                                <Border BorderBrush="#FFC9CACA" BorderThickness="0,0,1,0" Background="#FF1F3B53" Grid.RowSpan="2">
                                                    <Rectangle Stretch="Fill" StrokeThickness="1">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                                <GradientStop Color="#FCFFFFFF" Offset="0.015"/>
                                                                <GradientStop Color="#F7FFFFFF" Offset="0.375"/>
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                                <GradientStop Color="#D1FFFFFF" Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>
                                                </Border>
                                                <Rectangle Fill="#FFDBDCDC" Height="1" Grid.RowSpan="2" StrokeThickness="1" VerticalAlignment="Bottom" Width="Auto"/>
                                            </Grid>
                                        </ControlTemplate>
                                        <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="sdk:DataGridColumnHeader">
                                            <Grid x:Name="RootElement">
                                                <Grid.RowDefinitions>
                                                    <RowDefinition/>
                                                    <RowDefinition/>
                                                    <RowDefinition Height="Auto"/>
                                                </Grid.RowDefinitions>
                                                <Border BorderBrush="#FFC9CACA" BorderThickness="1,0,0,0" Background="#FF1F3B53" Grid.RowSpan="2">
                                                    <Rectangle Stretch="Fill">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                                <GradientStop Color="#FCFFFFFF" Offset="0.015"/>
                                                                <GradientStop Color="#F7FFFFFF" Offset="0.375"/>
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                                <GradientStop Color="#D1FFFFFF" Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Grid.Resources>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition/>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <sdk:DataGridColumnHeader x:Name="TopLeftCornerHeader" Template="{StaticResource TopLeftHeaderTemplate}" Width="22"/>
                                    <sdk:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1"/>
                                    <sdk:DataGridColumnHeader x:Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}"/>
                                    <Rectangle x:Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" Height="1" VerticalAlignment="Bottom" Width="Auto" Style="{StaticResource RectangleStyle1}"/>
                                    <sdk:DataGridRowsPresenter x:Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1" Background="#FF100F0F" Style="{StaticResource DataGridRowsPresenterStyle1}"/>
                                    <Rectangle x:Name="BottomRightCorner" Grid.Column="2" Fill="#FFE9EEF4" Grid.Row="2"/>
                                    <Rectangle x:Name="BottomLeftCorner" Grid.ColumnSpan="2" Fill="#FFE9EEF4" Grid.Row="2"/>
                                    <Grid Grid.Column="1" Grid.Row="2">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <Rectangle x:Name="FrozenColumnScrollBarSpacer"/>
                                        <ScrollBar x:Name="HorizontalScrollbar" Grid.Column="1" Height="18" Margin="-1,0,-1,-1" Orientation="Horizontal"/>
                                    </Grid>

                                </Grid>
                            </Border>
                            <Border x:Name="DisabledVisualElement" Background="#8CFFFFFF" CornerRadius="2" HorizontalAlignment="Stretch" Height="Auto" IsHitTestVisible="False" Opacity="0" VerticalAlignment="Stretch" Width="Auto"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="DataGridCellStyle" TargetType="sdk:DataGridCell">
            <Setter Property="Background" Value="{x:Null}"/>
            <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch"/>
            <Setter Property="IsTabStop" Value="False"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="sdk:DataGridCell">
                        <Grid x:Name="Root" Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CurrentStates">
                                    <VisualState x:Name="Regular"/>
                                    <VisualState x:Name="Current">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualState x:Name="Valid"/>
                                    <VisualState x:Name="Invalid">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InvalidVisualElement"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="FocusVisual" HorizontalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" VerticalAlignment="Stretch"/>
                            <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Rectangle x:Name="InvalidVisualElement" HorizontalAlignment="Stretch" IsHitTestVisible="False" Opacity="0" Stroke="#FFDC000C" StrokeThickness="1" VerticalAlignment="Stretch"/>
                            <Rectangle x:Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ListBoxItemStyle_SelectedNumber" TargetType="ListBoxItem">
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Top"/>
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="TabNavigation" Value="Local"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Grid Background="{TemplateBinding Background}" Margin="1" Cursor="Hand">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To=".35" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="fillColor"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="backRect" Stroke="#FF676767" Fill="#FF474747"/>
                            <Rectangle x:Name="fillColor" Fill="#FFBADDE9" IsHitTestVisible="False" Opacity="0" RadiusY="1" RadiusX="1"/>
                            <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Width="{Binding Width}" Margin="2"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="btnLock" TargetType="Button">
            <Setter Property="Background" Value="#FF1F3B53"/>
            <Setter Property="Foreground" Value="#FF000000"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                        <GradientStop Color="#FF718597" Offset="0.375"/>
                        <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Cursor="Hand">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Pressed"/>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)" Storyboard.TargetName="image">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <HorizontalAlignment>Right</HorizontalAlignment>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Image x:Name="image" Source="../Images/bg_backpct.png" Stretch="None">
                                <Image.RenderTransform>
                                    <CompositeTransform/>
                                </Image.RenderTransform>
                            </Image>
                            <Grid Margin="24,0,0,0">
                                <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Canvas Width="712" Height="600">
            <Rectangle Height="146" RadiusY="5" RadiusX="5" Stroke="#7FFFFFFF" StrokeThickness="0" Width="712" RenderTransformOrigin="0.5,0.5" Fill="#FF333333"/>
            <Canvas x:Name="CvWinDataPanel" Canvas.Left="6" Canvas.Top="7" Height="130" Width="700"></Canvas>
            <Canvas Height="488" Canvas.Top="152" Width="712">
                <Rectangle Height="472" Width="712" RadiusX="5" RadiusY="5" Stroke="#33FFFFFF">
                    <Rectangle.Fill>
                        <RadialGradientBrush>
                            <GradientStop Color="#FF333333"/>
                            <GradientStop Color="#FF373737" Offset="1"/>
                        </RadialGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <Rectangle Height="53" Width="712" Fill="Silver" RadiusX="5" RadiusY="5"/>
                <Rectangle Height="54" Width="712" Canvas.Top="6" StrokeThickness="0">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FF7C7C7C" Offset="1"/>
                            <GradientStop Color="#FFA3A3A3"/>
                            <GradientStop Color="#FFC2BEBE" Offset="0.979"/>
                            <GradientStop Color="#FFD6D6D6"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <Canvas  Height="23" Canvas.Top="6" Width="109" Canvas.Left="1">
                    <Path Data="M0,0 L103,0 L103,6.333333 L108.33333,10.499999 L103,15.333333 L103,21 L0,21 z" Height="24" Stretch="Fill" Width="90" UseLayoutRounding="False" Stroke="#FF959493" >
                        <Path.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White"/>
                                <GradientStop Color="#FFBABABA" Offset="1"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path Data="M0,0 L103,0 L103,6.333333 L108.33333,10.499999 L103,15.333333 L103,21 L0,21 z" Height="23" Stretch="Fill" Width="89" UseLayoutRounding="False" Canvas.Top="1" >
                        <Path.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFF2F2F2"/>
                                <GradientStop Color="#FFC2C1C1" Offset="1"/>
                            </LinearGradientBrush>
                        </Path.Fill>
                    </Path>
                    <TextBlock Height="16" Canvas.Left="21" TextWrapping="Wrap" Text="选择玩法" Width="57" Foreground="#FF626262" HorizontalAlignment="Right" FontStretch="SemiExpanded" FontSize="12" FontFamily="宋体" Canvas.Top="4"/>
                </Canvas>
                <Canvas Height="2" Canvas.Top="5" Width="710">
                    <Rectangle Height="1" Width="712" Fill="#FF9D9D9D" StrokeThickness="0" Canvas.Top="1"/>
                    <Rectangle Height="1" Width="712" Fill="#FFB8B8B8" StrokeThickness="0"/>
                </Canvas>
                <Rectangle x:Name="SelectGameItem" Height="31" Canvas.Left="194" RadiusY="3" RadiusX="3" Width="80" Stroke="#7FFFFFFF">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="White"/>
                            <GradientStop Color="#FFBABABA" Offset="1"/>
                            <GradientStop Color="#FFFF4600" Offset="0.079"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <Canvas x:Name="GameMenuContent" Height="20" Canvas.Left="120" Canvas.Top="4" Width="581" />
                <Canvas Height="2" Canvas.Left="1" Canvas.Top="29" Width="710">
                    <Rectangle Height="1" Width="710" Fill="#FF959493" StrokeThickness="0"/>
                    <Rectangle Height="1" Canvas.Top="1" Width="710" Fill="#FFD2D2D2" StrokeThickness="0"/>
                </Canvas>
            </Canvas>
            <Canvas Height="22" Canvas.Top="186" Canvas.Left="8" Width="694">
                <Rectangle x:Name="SelectModel" Height="22" Width="109" RadiusX="10" RadiusY="10" Stroke="#FF727272" Fill="#FFEFEFEF"/>
                <Canvas x:Name="GameModelContent" Height="18" Canvas.Left="10" Canvas.Top="3" Width="678"/>
            </Canvas>
            <Canvas x:Name="tbKeyBoardContent" Height="150" Canvas.Top="210" Canvas.Left="16" Width="678"/>
            <Canvas x:Name="ResultContent" Height="165" Canvas.Left="6" Canvas.Top="375" Width="697" >
                <Canvas Height="38" Canvas.Left="10" Width="386">
                    <TextBlock x:Name="tbSelectInvestNum" Height="14" Canvas.Left="198" TextWrapping="Wrap" Canvas.Top="11" Width="120" Foreground="#FFF3F3F3" FontSize="12"/>
                    <Canvas x:Name="btnAddNumber" Height="34" Width="87" HorizontalAlignment="Left">
                        <Rectangle Height="28" RadiusY="10" RadiusX="10" Width="77" Canvas.Left="6" Canvas.Top="6">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFCCCCCC" Offset="1"/>
                                    <GradientStop Color="White"/>
                                    <GradientStop Color="#FFD4D4D4" Offset="0.464"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <ed:BlockArrow Height="19.441" Canvas.Left="52.107" Orientation="Right" Stroke="White" Canvas.Top="9" UseLayoutRounding="False" Width="15.229" RenderTransformOrigin="0.5,0.5" ArrowBodySize="0.37" Opacity="0.9" ArrowheadAngle="98">
                            <ed:BlockArrow.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF4E4848" Offset="0.523"/>
                                    <GradientStop Color="#FF999595" Offset="0.469"/>
                                </LinearGradientBrush>
                            </ed:BlockArrow.Fill>
                            <ed:BlockArrow.RenderTransform>
                                <CompositeTransform Rotation="90"/>
                            </ed:BlockArrow.RenderTransform>
                        </ed:BlockArrow>
                        <TextBlock Height="18" TextWrapping="Wrap" Text="选号" Width="30" FontSize="12" Foreground="#FF3B2B2B" Canvas.Top="11" Canvas.Left="22"/>
                    </Canvas>
                    <Canvas x:Name="btnClearNubmer" Height="34" Canvas.Left="94" Width="87" HorizontalAlignment="Left">
                        <Rectangle Height="28" RadiusY="10" RadiusX="10" Width="77" Canvas.Left="6" Canvas.Top="6">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFCCCCCC" Offset="1"/>
                                    <GradientStop Color="White"/>
                                    <GradientStop Color="#FFD4D4D4" Offset="0.464"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <ed:BlockArrow Height="19.441" Canvas.Left="52.107" Orientation="Right" Stroke="White" Canvas.Top="9" UseLayoutRounding="False" Width="15.229" RenderTransformOrigin="0.5,0.5" ArrowBodySize="0.37" Opacity="0.9" ArrowheadAngle="98">
                            <ed:BlockArrow.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF4E4848" Offset="0.523"/>
                                    <GradientStop Color="#FF999595" Offset="0.469"/>
                                </LinearGradientBrush>
                            </ed:BlockArrow.Fill>
                            <ed:BlockArrow.RenderTransform>
                                <CompositeTransform Rotation="270"/>
                            </ed:BlockArrow.RenderTransform>
                        </ed:BlockArrow>
                        <TextBlock Height="18" TextWrapping="Wrap" Text="清空" Width="30" FontSize="12"  Foreground="#FF3B2B2B" Canvas.Top="11" Canvas.Left="22"/>
                    </Canvas>
                    <Canvas x:Name="CvMultipleToolTip" Height="53" Canvas.Left="420" Width="180">
                        <Path Data="M0.5,8 C0.5,6.8954306 1.3954304,6 2.5,6 L205.75,6 C206.85457,6 207.75,6.8954306 207.75,8 L207.75,29.5 C207.75,30.60457 206.85457,31.5 205.75,31.5 L89.833366,31.5 L96.666618,41.333336 L73.666809,31.5 L2.5,31.5 C1.3954304,31.5 0.5,30.60457 0.5,29.5 z" Height="36.334" Stretch="Fill" Stroke="#33FFFFFF" Width="162" UseLayoutRounding="False" Fill="#A34E5452" Canvas.Top="5.5" Canvas.Left="3" />
                        <TextBlock Height="18" Canvas.Left="11" TextWrapping="Wrap" Text="提示: 下单金额必须大于0.1元" Canvas.Top="11" Width="150" FontSize="10.667" Foreground="#FFFFD200" FontFamily="宋体" FontWeight="Bold"/>
                    </Canvas>
                </Canvas>
                <Canvas Height="116" Canvas.Top="40" Width="360" VerticalAlignment="Top">
                    <ListBox Name="listSelectedNumbers" d:LayoutOverrides="GridBox" Height="116" Width="360" HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Black" ItemContainerStyle="{StaticResource ListBoxItemStyle_SelectedNumber}" ScrollViewer.VerticalScrollBarVisibility="Visible">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <toolkit:WrapPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </ListBox>
                </Canvas>
                <Canvas Height="50" Canvas.Left="380" Canvas.Top="104" Width="142">
                    <Button x:Name="btnPost" Style="{StaticResource btnLock}" Height="50" Margin="0,0,0,0" Width="140" IsEnabled="False">
                        <TextBlock Text="投   注" TextWrapping="Wrap"  Foreground="#FF131611" FontWeight="Bold" Margin="0,14,12,0" HorizontalAlignment="Center" FontSize="16" />
                    </Button>
                </Canvas>
                <TextBlock Height="18" Canvas.Left="390" TextWrapping="Wrap" Canvas.Top="76" Width="140" Foreground="#FFFBFBFB" FontSize="12"><Run Text="当前投注: "/><Run x:Name="rnSumInvestNum" Text="0">
        			<Run.Foreground>
        				<SolidColorBrush Color="#FFF30000">
        					<SolidColorBrush.RelativeTransform>
        						<MatrixTransform Matrix="Identity"/>
        					</SolidColorBrush.RelativeTransform>
        					<SolidColorBrush.Transform>
        						<MatrixTransform Matrix="Identity"/>
        					</SolidColorBrush.Transform>
        				</SolidColorBrush>
        			</Run.Foreground>
        		</Run><Run Text=" 个号码"/></TextBlock>
                <TextBlock Height="18" Canvas.Left="390" TextWrapping="Wrap" Canvas.Top="42" Width="110" Foreground="White" Text="单个号码下单金额:" FontSize="12"/>
                <TextBox x:Name="tbMultiple" Height="18" Canvas.Left="506" TextWrapping="Wrap" Text="10" MaxLength="7" Canvas.Top="42" Width="50" BorderThickness="0" TextChanged="tbMultiple_TextChanged" />
                <TextBlock Height="18" Canvas.Left="554" TextWrapping="Wrap" Canvas.Top="76" Width="140" Foreground="#FFFBFBFB" FontSize="12"><Run Text="总金额："/><Run x:Name="rnSumMoney" Text="0">
                    <Run.Foreground>
        				<SolidColorBrush Color="Red">
        					<SolidColorBrush.RelativeTransform>
        						<MatrixTransform Matrix="Identity"/>
        					</SolidColorBrush.RelativeTransform>
        					<SolidColorBrush.Transform>
        						<MatrixTransform Matrix="Identity"/>
        					</SolidColorBrush.Transform>
        				</SolidColorBrush>
        			</Run.Foreground></Run><Run Text=" 元"/>
                </TextBlock>
                <CheckBox x:Name="cbChase" Height="18" Canvas.Left="580" Canvas.Top="43" Background="{x:Null}" Foreground="#FFF2FF04" FontSize="12" Content="我要追号" Checked="cbChase_Checked" />
                <Canvas Height="50" Canvas.Left="550" Canvas.Top="104" Width="142">
                    <Button x:Name="btnBackpct" Style="{StaticResource btnLock}" Width="140" Height="50" IsEnabled="False">
                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <TextBlock x:Name="lbBonus" Height="20" Width="46" FontSize="14" Foreground="#FFCC0000" FontWeight="Bold" TextWrapping="Wrap" Text="1850" />
                                <TextBlock TextWrapping="Wrap" Text="/" Foreground="Black" Margin="-2,2,4,2"/>
                                <TextBlock x:Name="lbScale" Height="20" Width="40" TextWrapping="Wrap" Text="850" FontSize="14" Foreground="#FFCC0000" FontWeight="Bold"/>
                            </StackPanel>
                            <TextBlock x:Name="lbBackPct" TextWrapping="Wrap" Height="20" Text="0.00%" HorizontalAlignment="Right" Width="72" FontSize="14.667" Foreground="#FF0E0000" FontWeight="Bold"/>
                        </StackPanel>
                    </Button>
                </Canvas>
            </Canvas>
            <Grid x:Name="HistoryGrid" Height="76" Width="700" Canvas.Top="538" Canvas.Left="6">
                <Rectangle RadiusY="2" RadiusX="2" Stroke="#FF838383" Fill="#FF100F0F" Margin="0,0,1,-2"/>
                <Canvas x:Name="Head" Height="20" Margin="1,1,2,0" VerticalAlignment="Top">
                    <Rectangle Height="20" RadiusY="2" RadiusX="2" Width="697" Fill="#FF3D3D3D"/>
                    <Canvas x:Name="head" Height="19" Width="697">
                        <TextBlock Height="18" Canvas.Left="28" TextWrapping="Wrap" Text="方案号" Canvas.Top="1" Width="47" Foreground="#FFCACACA" FontSize="12"/>
                        <TextBlock Height="18" Canvas.Left="137" TextWrapping="Wrap" Text="购买时间" Canvas.Top="1" Width="60" Foreground="#FFCACACA" FontSize="12" />
                        <TextBlock Height="18" Canvas.Left="339" TextWrapping="Wrap" Text="方案标题" Width="76" Foreground="#FFCACACA" FontSize="12"/>
                        <TextBlock Height="18" Canvas.Left="539" TextWrapping="Wrap" Text="单注金额" Canvas.Top="1" Width="60" Foreground="#FFCACACA" FontSize="12"/>
                        <TextBlock Height="18" Canvas.Left="628" TextWrapping="Wrap" Text="投注总额" Canvas.Top="1" Width="60" Foreground="#FFCACACA" FontSize="12"/>
                    </Canvas>
                </Canvas>
                <Canvas x:Name="GridView" Margin="2,20,0,0" VerticalAlignment="Top">
                    <sdk:DataGrid x:Name="BuyDataGrid" Width="692" Background="{x:Null}" AlternatingRowBackground="{x:Null}" BorderBrush="{x:Null}" AutoGenerateColumns="False" IsReadOnly="True" Foreground="White" GridLinesVisibility="None" HeadersVisibility="None" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{x:Null}" ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}" RowStyle="{StaticResource DataGridRowStyle1}"  Style="{StaticResource DataGridStyle1}" RowBackground="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" Height="Auto" BorderThickness="0" RowHeight="16">
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTemplateColumn Width="90" CanUserReorder="True" CanUserResize="True" CanUserSort="True" CellStyle="{StaticResource DataGridCellStyle}">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock TextAlignment="Center" Canvas.Left="20" Foreground="#FFE4E4E4" FontSize="12" Width="80" MouseLeftButtonUp="tbSchemeID_Click" Tag="{Binding IDStr}" Cursor="Hand" Text="{Binding IDStr}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Width="150" CanUserReorder="True" CanUserResize="True" CanUserSort="True" CellStyle="{StaticResource DataGridCellStyle}">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock  TextAlignment="Center" Foreground="#FFE4E4E4" FontSize="12" Width="140" Text="{Binding DealTime, StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Width="290" CanUserReorder="True" CanUserResize="True" CanUserSort="True" CellStyle="{StaticResource DataGridCellStyle}">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate >
                                        <TextBlock Canvas.Left="40" TextAlignment="Center" Foreground="#FFD6D7C6" FontSize="12" Width="250" Text="{Binding Title, Mode=OneWay}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Width="72" CanUserReorder="True" CanUserResize="True" CanUserSort="True" CellStyle="{StaticResource DataGridCellStyle}">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock TextAlignment="Center"  Foreground="#FFE4E4E4" FontSize="12"  Width="64" Text="{Binding Multiple}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                            <sdk:DataGridTemplateColumn Width="90" CanUserReorder="True" CanUserResize="True" CanUserSort="True" CellStyle="{StaticResource DataGridCellStyle}">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock TextAlignment="Center"  Foreground="#FFE4E4E4" FontSize="12"  Width="90" Text="{Binding SchemeMoney}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>
                </Canvas>
            </Grid>
        </Canvas>
        <!--Source="../Audio/msg.mp3"-->
        <MediaElement x:Name="msg_mp3"  Volume="1" AutoPlay="False"/>
        <StackPanel x:Name="msgList" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="200"/>
    </Grid>
</UserControl>
